const request = require('request')
const url_tencent = 'https://matchweb.sports.qq.com/'

const Tencent = {
    getGameList: async (startTime = '', endTime = '') => {
        let url = `${url_tencent}kbs/list?columnId=100000&startTime=${startTime}&endTime=${endTime}`
        return new Promise((resolve, reject) => {
            request.get(url, (err, res, body) => {
                if (err) {
                    reject(err)
                } else {
                    resolve(JSON.parse(body))
                }
            })
        })
    }
}

module.exports = Tencent